package com.dnjn.happiness.auth.api;

import com.dnjn.happiness.auth.api.factory.RemoteAuthFallbackFactory;
import com.dnjn.happiness.common.core.constant.SecurityConstants;
import com.dnjn.happiness.common.core.constant.ServiceNameConstants;
import com.dnjn.happiness.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteAuthService",value = ServiceNameConstants.AUTH_SERVICE,fallbackFactory = RemoteAuthFallbackFactory.class)
public interface RemoteAuthService {

    @GetMapping("/validLinkedUrlApi/{host}")
    public R<Boolean> validLinkedUrlApi(@PathVariable("host") String host,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
